import '../public/index'
import store from 'store'

let data = new Vue({
  el: '#data',
  data: () => ({
    systemUser: {
      loginName: '',
      realName: '',
      phone: '',
      lastLoginTime: ''
    },
    enterInfo: {
      enterprisePrefix: '',
      enterpriseName: '',
      id: '',
    },
    bankName: '',
    bankRealname: '',
    bankCardNo: '',
    rawAddTime: '',
    operUserLoginName: '',
    merchantBank: '',
    invitationCode: ''
  }),
  mounted: function() {
    let storeData = store.get('storeData')

    console.log(storeData)

    if (!storeData) {
      layer.msg('页面跳转错误', {
        icon: 5
      })

      setTimeout(() => {
        window.location = './index.html'
      }, 1000)

      return
    }

    // 合并数据
    $.extend(this.$data, storeData)
  }
})

